//
//  FirstViewController.m
//  UIComprehensive
//
//  Created by lanou3g on 16/1/25.
//  Copyright © 2016年 徐强. All rights reserved.
//

#import "FirstViewController.h"
#import "TouchViewController.h"
#import "DesignModelViewController.h"
@interface FirstViewController ()

@end

@implementation FirstViewController
-(void)loadView{
    self.firstV = [[FirstView alloc]initWithFrame:([UIScreen mainScreen].bounds)];
    self.view = self.firstV;
}
- (void)viewDidLoad {
    [super viewDidLoad];
     self.title = @"基本控件";
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithTitle:@"两种设计模式" style:UIBarButtonItemStyleDone target:self action:@selector(leftAction:)];
    self.navigationItem.leftBarButtonItem = leftItem;
    
    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"Touch/gusture" style:UIBarButtonItemStylePlain target:self action:@selector(rightItemAction:)];
    self.navigationItem.rightBarButtonItem = rightItem;
}
- (void)leftAction:(UIBarButtonItem *)sender{
    //跳转到下一界面：两种设计模式
    [self.navigationController pushViewController:[DesignModelViewController new] animated:YES];
}
- (void)rightItemAction:(UIBarButtonItem *)sender{
    //跳转到下一界面：touch知识点
    [self.navigationController pushViewController:[TouchViewController new] animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
